// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2005-4-29

#ifndef __GUARDCS_H_COMMON_GUARD__
#define __GUARDCS_H_COMMON_GUARD__

#pragma once

namespace JoyGuard
{

class ModCheck;
class ProcCheck;

//##ModelId=44C4B60E0000
class GuardCS
{
public:
	//##ModelId=44C4B60E0001
    HANDLE  m_waitEvent;
	//##ModelId=44C4B60E0010
    ModCheck*   m_modCheck;
	//##ModelId=44C4B60E0015
    ProcCheck*  m_procCheck;

public:
	//##ModelId=44C4B60E001F
    GuardCS();
	//##ModelId=44C4B60E0020
    virtual ~GuardCS();

	//##ModelId=44C4B60E0022
    bool Create(HANDLE hProcess, DWORD dwProcessId);
	//##ModelId=44C4B60E0025
    void Close();

	//##ModelId=44C4B60E002E
    bool Created() const
    {
        return m_modCheck != NULL;
    }
};

} // namespace JoyGuard

#endif  // __GUARDCS_H_COMMON_GUARD__
